package com.ourteam.education.domain;
/**
 * Template Name : DTO数据对象
 * Template Version : 1
 * Template Last Modfiy Date : Fri Nov 30 16:49:33 CST 2018
 * Auto Generate Date : 2019-09-22 15:15:33
  * Warning ! This file will be overwrite when regenerate !
  * 
 */

import java.util.Map;
import java.util.HashMap;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.beanutils.BeanMap;
import net.dao.IDataPopulateCallback;


public class TeacherCampusRelateBean implements java.io.Serializable {

        
	private static Map<String,String> mappedDaoFields = new HashMap<String,String>();
    
	private com.ourteam.education.dao.TeacherCampusRelate teacherCampusRelate;

	protected BeanMap getBeanMap(){
	
		return new BeanMap(teacherCampusRelate);
	}
	
	static{
				
												
		mappedDaoFields.put("id",com.ourteam.education.dao.ITeacherCampusRelateDAO.Id);
		
														
				
																
				
																
				
																
		mappedDaoFields.put("teacherId",com.ourteam.education.dao.ITeacherCampusRelateDAO.TeacherId);
		
										
				
																
				
																
				
																				
		mappedDaoFields.put("campusId",com.ourteam.education.dao.ITeacherCampusRelateDAO.CampusId);
		
						
				
																
				
																
				
																		
				
										
		mappedDaoFields.put("teacherName",com.ourteam.education.dao.ITeacherCampusRelateDAO.TeacherName);
								
				
																
				
																		
				
																
				
										
		mappedDaoFields.put("campusName",com.ourteam.education.dao.ITeacherCampusRelateDAO.CampusName);
								
				
				
	}
	
	public static String getMappedDAOField(String aAttrName){
		return mappedDaoFields.get(aAttrName);
	}
	
	
	public TeacherCampusRelateBean() {
		super();
	    		
		this.teacherCampusRelate = new com.ourteam.education.dao.TeacherCampusRelate();
                
	}
	
		
	public TeacherCampusRelateBean(com.ourteam.education.dao.TeacherCampusRelate teacherCampusRelate) {
		super();
	
		this.teacherCampusRelate = teacherCampusRelate;
		
	}
		
		
		
    	
	public com.ourteam.education.dao.TeacherCampusRelate convertToTeacherCampusRelate(){
		return this.teacherCampusRelate;
	}
	
	public com.ourteam.education.dao.TeacherCampusRelate convertTo(){
		return this.teacherCampusRelate;
	}
	
			
		
			
			
		
	/**
	 * Get id
	 * 
	 * @return long
	 */
	public long getId(){
		return (long) this.teacherCampusRelate.getId();
	}
	
	/**
	 * Set id
	 * 
	 * @parameter long
	 */
	public void setId(long id){
		
		this.teacherCampusRelate.setId(id);
	}
		
							
			
									
			
									
		
		
					
			
		
	/**
	 * Get teacherId
	 * 
	 * @return long
	 */
	public long getTeacherId(){
		return (long) this.teacherCampusRelate.getTeacherId();
	}
	
	/**
	 * Set teacherId
	 * 
	 * @parameter long
	 */
	public void setTeacherId(long teacherId){
		
		this.teacherCampusRelate.setTeacherId(teacherId);
	}
		
					
			
									
			
									
		
		
							
			
		
	/**
	 * Get campusId
	 * 
	 * @return long
	 */
	public long getCampusId(){
		return (long) this.teacherCampusRelate.getCampusId();
	}
	
	/**
	 * Set campusId
	 * 
	 * @parameter long
	 */
	public void setCampusId(long campusId){
		
		this.teacherCampusRelate.setCampusId(campusId);
	}
		
			
			
									
			
									
		
		
								
			
					
			
		
	/**
	 * Get teacherName
	 * 
	 * @return String
	 */
	public String getTeacherName(){
		
		return (String) this.teacherCampusRelate.getTeacherName();
			
	}
	
					
			
									
		
		
								
			
									
			
					
			
		
	/**
	 * Get campusName
	 * 
	 * @return String
	 */
	public String getCampusName(){
		
		return (String) this.teacherCampusRelate.getCampusName();
			
	}
	
					
		
			
			
			
			
			
			
			
	
	public int hashCode() {
   		return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
 	}
	
		
	public boolean equals(Object obj) {
		if (obj == null) {
            return false;
        } // end if

        if ((obj instanceof TeacherCampusRelateBean) == false) {
            return false;
        } // end if

        TeacherCampusRelateBean other = (TeacherCampusRelateBean) obj;
        
        boolean isEqual = false;
        
                
        com.ourteam.education.dao.TeacherCampusRelate tempTeacherCampusRelate = other.convertToTeacherCampusRelate();
        
        if(tempTeacherCampusRelate == null || this.teacherCampusRelate == null){
        	isEqual = false;
        }
        else if(tempTeacherCampusRelate == this.teacherCampusRelate || tempTeacherCampusRelate.equals(this.teacherCampusRelate) ){
        	isEqual = true;
        }
        else{
        	isEqual = false;
        }
        
        return isEqual;
	}
	
	
	public static TeacherCampusRelateBean[] toArray(com.ourteam.education.dao.TeacherCampusRelate[] aTeacherCampusRelates){
		
		return toArray(aTeacherCampusRelates,null);
	}
	
	public static TeacherCampusRelateBean[] toArray(com.ourteam.education.dao.TeacherCampusRelate[] aTeacherCampusRelates , IDataPopulateCallback aCallBack){
		 
		 if(ArrayUtils.isEmpty(aTeacherCampusRelates)){
		 	return new TeacherCampusRelateBean[0];
		 }
		 
		 int length = aTeacherCampusRelates.length;
		 
		 TeacherCampusRelateBean[] beans = new TeacherCampusRelateBean[length];
		  
		 for (int i = 0; i < length; i++) {
			beans[i] = new TeacherCampusRelateBean(aTeacherCampusRelates[i]);
			if(aCallBack != null){
			    aCallBack.populate(beans[i],new Object[]{aTeacherCampusRelates[i]});
			}
		 }
		 
		 return beans;
	 }
	 
	 	 
}